import { init } from 'snabbdom/build/package/init'
import { h} from 'snabbdom/build/package/h'

let patch = init([])

let vnode = h('div#container', [
    h('h1', 'hello snabbdom'),
    h('p', '这是一个p标签')
])

let app = document.querySelector('#app')

let oldVnode = patch(app, vnode)

setTimeout(()=>{
    vnode = h('div#container',[
        h('h1', 'hello world'),
        h('p', 'hello p')
    ])
    patch(oldVnode, vnode)
},2000)


